#ifndef _QUEUE_H_  
#define _QUEUE_H_ 

/**
 * \file queue.h
 * \author Clecio Varjao and Leanne Ross
 * \date October 2007
 * \brief A Skeleton Implementation of Queues
 */

	struct structQueueItem;

	typedef struct structQueue
	{
		unsigned char allocated;
		unsigned char isCircular;
		struct structQueueItem *next;
		struct structQueueItem *first;
		struct structQueueItem *last;
	} QUEUE;

	typedef struct structQueueItem
	{
		unsigned char allocated;
		void *item; //Generic pointer
		struct structQueueItem *prev;
		struct structQueueItem *next;
	} QUEUE_ITEM;		

	
	QUEUE *queue_create(unsigned char mode);
	void queue_remove(QUEUE *q, void *p);
	void enqueue(QUEUE *q, void *p);
	void *dequeue(QUEUE *q);
	void dequeueAt(QUEUE *q, QUEUE_ITEM *item);

#endif /* _QUEUE_H_ */
